From 7ae5eb4c8c34805eee647dd11fce4879d225c088 Mon Sep 17 00:00:00 2001 From: Robert Lipe Date: Sat, 7 Jul 2018 01:03:30 -0500 Subject: [PATCH] Remove gpsinput.{cc,h} Remove unused Jeeps file handling old Jeeps Almanac files and other esoterica uninteresting to us. --- GPSBabel.pro | 1 - Makefile.in | 58 +- jeeps/gps.h | 1 - jeeps/gpsinput.cc | 2608 ----------------------------------------- jeeps/gpsinput.h | 14 - msvc/GPSBabel.vcxproj | 1 - 6 files changed, 29 insertions(+), 2654 deletions(-) delete mode 100644 jeeps/gpsinput.cc delete mode 100644 jeeps/gpsinput.h diff --git a/GPSBabel.pro b/GPSBabel.pro index e6036e37e..d9cc6b851 100644 --- a/GPSBabel.pro +++ b/GPSBabel.pro @@ -115,7 +115,6 @@ HEADERS = \ jeeps/gpsdatum.h \ jeeps/gpsdevice.h \ jeeps/gpsfmt.h \ - jeeps/gpsinput.h \ jeeps/gpsmath.h \ jeeps/gpsmem.h \ jeeps/gpsport.h \ diff --git a/Makefile.in b/Makefile.in index e7e8d59de..7e85c9c41 100644 --- a/Makefile.in +++ b/Makefile.in @@ -479,7 +479,7 @@ csv_util.o: csv_util.cc csv_util.h queue.h defs.h config.h zlib/zlib.h \ jeeps/gpsport.h jeeps/gpsdevice.h jeeps/gps.h jeeps/gpssend.h \ jeeps/gpsread.h jeeps/gpsutil.h jeeps/gpsapp.h jeeps/gpsprot.h \ jeeps/gpscom.h jeeps/gpsfmt.h jeeps/gpsmath.h jeeps/gpsmem.h \ - jeeps/gpsrqst.h jeeps/gpsinput.h jeeps/gpsproj.h grtcirc.h \ + jeeps/gpsrqst.h jeeps/gpsproj.h grtcirc.h \ jeeps/gpsmath.h src/core/logging.h strptime.h xcsv_tokens.gperf delgpl.o: delgpl.cc defs.h config.h queue.h zlib/zlib.h zlib/zconf.h \ config.h gbfile.h cet.h inifile.h session.h src/core/datetime.h @@ -489,7 +489,7 @@ destinator.o: destinator.cc defs.h config.h queue.h zlib/zlib.h \ jeeps/gpsport.h jeeps/gpsdevice.h jeeps/gps.h jeeps/gpssend.h \ jeeps/gpsread.h jeeps/gpsutil.h jeeps/gpsapp.h jeeps/gpsprot.h \ jeeps/gpscom.h jeeps/gpsfmt.h jeeps/gpsmath.h jeeps/gpsmem.h \ - jeeps/gpsrqst.h jeeps/gpsinput.h jeeps/gpsproj.h strptime.h + jeeps/gpsrqst.h jeeps/gpsproj.h strptime.h dg-100.o: dg-100.cc defs.h config.h queue.h zlib/zlib.h zlib/zconf.h \ config.h gbfile.h cet.h inifile.h session.h src/core/datetime.h gbser.h discard.o: discard.cc defs.h config.h queue.h zlib/zlib.h zlib/zconf.h \ @@ -534,7 +534,7 @@ g7towin.o: g7towin.cc defs.h config.h queue.h zlib/zlib.h zlib/zconf.h \ jeeps/gpsport.h jeeps/gpsdevice.h jeeps/gps.h jeeps/gpssend.h \ jeeps/gpsread.h jeeps/gpsutil.h jeeps/gpsapp.h jeeps/gpsprot.h \ jeeps/gpscom.h jeeps/gpsfmt.h jeeps/gpsmath.h jeeps/gpsmem.h \ - jeeps/gpsrqst.h jeeps/gpsinput.h jeeps/gpsproj.h garmin_tables.h \ + jeeps/gpsrqst.h jeeps/gpsproj.h garmin_tables.h \ jeeps/gpsmath.h strptime.h garmin.o: garmin.cc cet_util.h config.h cet.h defs.h queue.h zlib/zlib.h \ zlib/zconf.h config.h gbfile.h inifile.h session.h src/core/datetime.h \ @@ -542,7 +542,7 @@ garmin.o: garmin.cc cet_util.h config.h cet.h defs.h queue.h zlib/zlib.h \ jeeps/gpsport.h jeeps/gpsdevice.h jeeps/gps.h jeeps/gpssend.h \ jeeps/gpsread.h jeeps/gpsutil.h jeeps/gpsapp.h jeeps/gpsprot.h \ jeeps/gpscom.h jeeps/gpsfmt.h jeeps/gpsmath.h jeeps/gpsmem.h \ - jeeps/gpsrqst.h jeeps/gpsinput.h jeeps/gpsproj.h garmin_tables.h \ + jeeps/gpsrqst.h jeeps/gpsproj.h garmin_tables.h \ grtcirc.h jeeps/gpsserial.h garmin_device_xml.o: garmin_device_xml.cc defs.h config.h queue.h \ zlib/zlib.h zlib/zconf.h config.h gbfile.h cet.h inifile.h session.h \ @@ -556,14 +556,14 @@ garmin_fs.o: garmin_fs.cc defs.h config.h queue.h zlib/zlib.h \ jeeps/gpsport.h jeeps/gpsdevice.h jeeps/gps.h jeeps/gpssend.h \ jeeps/gpsread.h jeeps/gpsutil.h jeeps/gpsapp.h jeeps/gpsprot.h \ jeeps/gpscom.h jeeps/gpsfmt.h jeeps/gpsmath.h jeeps/gpsmem.h \ - jeeps/gpsrqst.h jeeps/gpsinput.h jeeps/gpsproj.h garmin_tables.h + jeeps/gpsrqst.h jeeps/gpsproj.h garmin_tables.h garmin_gpi.o: garmin_gpi.cc defs.h config.h queue.h zlib/zlib.h \ zlib/zconf.h config.h gbfile.h cet.h inifile.h session.h \ src/core/datetime.h cet_util.h garmin_fs.h jeeps/gps.h jeeps/../defs.h \ jeeps/gpsport.h jeeps/gpsdevice.h jeeps/gps.h jeeps/gpssend.h \ jeeps/gpsread.h jeeps/gpsutil.h jeeps/gpsapp.h jeeps/gpsprot.h \ jeeps/gpscom.h jeeps/gpsfmt.h jeeps/gpsmath.h jeeps/gpsmem.h \ - jeeps/gpsrqst.h jeeps/gpsinput.h jeeps/gpsproj.h garmin_gpi.h \ + jeeps/gpsrqst.h jeeps/gpsproj.h garmin_gpi.h \ jeeps/gpsmath.h garmin_tables.o: garmin_tables.cc garmin_tables.h defs.h config.h queue.h \ zlib/zlib.h zlib/zconf.h config.h gbfile.h cet.h inifile.h session.h \ @@ -574,7 +574,7 @@ garmin_txt.o: garmin_txt.cc defs.h config.h queue.h zlib/zlib.h \ jeeps/../defs.h jeeps/gpsport.h jeeps/gpsdevice.h jeeps/gps.h \ jeeps/gpssend.h jeeps/gpsread.h jeeps/gpsutil.h jeeps/gpsapp.h \ jeeps/gpsprot.h jeeps/gpscom.h jeeps/gpsfmt.h jeeps/gpsmath.h \ - jeeps/gpsmem.h jeeps/gpsrqst.h jeeps/gpsinput.h jeeps/gpsproj.h \ + jeeps/gpsmem.h jeeps/gpsrqst.h jeeps/gpsproj.h \ garmin_tables.h grtcirc.h jeeps/gpsmath.h strptime.h garmin_xt.o: garmin_xt.cc defs.h config.h queue.h zlib/zlib.h \ zlib/zconf.h config.h gbfile.h cet.h inifile.h session.h \ @@ -595,7 +595,7 @@ gdb.o: gdb.cc defs.h config.h queue.h zlib/zlib.h zlib/zconf.h config.h \ jeeps/gpsdevice.h jeeps/gps.h jeeps/gpssend.h jeeps/gpsread.h \ jeeps/gpsutil.h jeeps/gpsapp.h jeeps/gpsprot.h jeeps/gpscom.h \ jeeps/gpsfmt.h jeeps/gpsmath.h jeeps/gpsmem.h jeeps/gpsrqst.h \ - jeeps/gpsinput.h jeeps/gpsproj.h garmin_tables.h grtcirc.h \ + jeeps/gpsproj.h garmin_tables.h grtcirc.h \ jeeps/gpsmath.h geo.o: geo.cc defs.h config.h queue.h zlib/zlib.h zlib/zconf.h config.h \ gbfile.h cet.h inifile.h session.h src/core/datetime.h src/core/file.h \ @@ -640,7 +640,7 @@ gpx.o: gpx.cc defs.h config.h queue.h zlib/zlib.h zlib/zconf.h config.h \ jeeps/gpsdevice.h jeeps/gps.h jeeps/gpssend.h jeeps/gpsread.h \ jeeps/gpsutil.h jeeps/gpsapp.h jeeps/gpsprot.h jeeps/gpscom.h \ jeeps/gpsfmt.h jeeps/gpsmath.h jeeps/gpsmem.h jeeps/gpsrqst.h \ - jeeps/gpsinput.h jeeps/gpsproj.h garmin_tables.h src/core/file.h defs.h \ + jeeps/gpsproj.h garmin_tables.h src/core/file.h defs.h \ src/core/logging.h src/core/xmlstreamwriter.h src/core/xmltag.h grtcirc.o: grtcirc.cc defs.h config.h queue.h zlib/zlib.h zlib/zconf.h \ config.h gbfile.h cet.h inifile.h session.h src/core/datetime.h \ @@ -690,7 +690,7 @@ jeeps/gpsapp.o: jeeps/gpsapp.cc jeeps/gps.h jeeps/../defs.h \ jeeps/../session.h jeeps/../src/core/datetime.h jeeps/gpsport.h \ jeeps/gpsdevice.h jeeps/gpssend.h jeeps/gpsread.h jeeps/gpsutil.h \ jeeps/gpsapp.h jeeps/gpsprot.h jeeps/gpscom.h jeeps/gpsfmt.h \ - jeeps/gpsmath.h jeeps/gpsmem.h jeeps/gpsrqst.h jeeps/gpsinput.h \ + jeeps/gpsmath.h jeeps/gpsmem.h jeeps/gpsrqst.h \ jeeps/gpsproj.h jeeps/garminusb.h jeeps/gpsserial.h jeeps/gpsusbint.h jeeps/gpscom.o: jeeps/gpscom.cc jeeps/gps.h jeeps/../defs.h \ jeeps/../config.h jeeps/../queue.h zlib/zlib.h zlib/zconf.h config.h \ @@ -698,7 +698,7 @@ jeeps/gpscom.o: jeeps/gpscom.cc jeeps/gps.h jeeps/../defs.h \ jeeps/../session.h jeeps/../src/core/datetime.h jeeps/gpsport.h \ jeeps/gpsdevice.h jeeps/gpssend.h jeeps/gpsread.h jeeps/gpsutil.h \ jeeps/gpsapp.h jeeps/gpsprot.h jeeps/gpscom.h jeeps/gpsfmt.h \ - jeeps/gpsmath.h jeeps/gpsmem.h jeeps/gpsrqst.h jeeps/gpsinput.h \ + jeeps/gpsmath.h jeeps/gpsmem.h jeeps/gpsrqst.h \ jeeps/gpsproj.h jeeps/gpsdevice.o: jeeps/gpsdevice.cc jeeps/gps.h jeeps/../defs.h \ jeeps/../config.h jeeps/../queue.h zlib/zlib.h zlib/zconf.h config.h \ @@ -706,7 +706,7 @@ jeeps/gpsdevice.o: jeeps/gpsdevice.cc jeeps/gps.h jeeps/../defs.h \ jeeps/../session.h jeeps/../src/core/datetime.h jeeps/gpsport.h \ jeeps/gpsdevice.h jeeps/gpssend.h jeeps/gpsread.h jeeps/gpsutil.h \ jeeps/gpsapp.h jeeps/gpsprot.h jeeps/gpscom.h jeeps/gpsfmt.h \ - jeeps/gpsmath.h jeeps/gpsmem.h jeeps/gpsrqst.h jeeps/gpsinput.h \ + jeeps/gpsmath.h jeeps/gpsmem.h jeeps/gpsrqst.h \ jeeps/gpsproj.h jeeps/gpsserial.h jeeps/gpsdevice_ser.o: jeeps/gpsdevice_ser.cc jeeps/gps.h jeeps/../defs.h \ jeeps/../config.h jeeps/../queue.h zlib/zlib.h zlib/zconf.h config.h \ @@ -714,7 +714,7 @@ jeeps/gpsdevice_ser.o: jeeps/gpsdevice_ser.cc jeeps/gps.h jeeps/../defs.h \ jeeps/../session.h jeeps/../src/core/datetime.h jeeps/gpsport.h \ jeeps/gpsdevice.h jeeps/gpssend.h jeeps/gpsread.h jeeps/gpsutil.h \ jeeps/gpsapp.h jeeps/gpsprot.h jeeps/gpscom.h jeeps/gpsfmt.h \ - jeeps/gpsmath.h jeeps/gpsmem.h jeeps/gpsrqst.h jeeps/gpsinput.h \ + jeeps/gpsmath.h jeeps/gpsmem.h jeeps/gpsrqst.h \ jeeps/gpsproj.h jeeps/gpsserial.h jeeps/gpsdevice_usb.o: jeeps/gpsdevice_usb.cc jeeps/gps.h jeeps/../defs.h \ jeeps/../config.h jeeps/../queue.h zlib/zlib.h zlib/zconf.h config.h \ @@ -722,7 +722,7 @@ jeeps/gpsdevice_usb.o: jeeps/gpsdevice_usb.cc jeeps/gps.h jeeps/../defs.h \ jeeps/../session.h jeeps/../src/core/datetime.h jeeps/gpsport.h \ jeeps/gpsdevice.h jeeps/gpssend.h jeeps/gpsread.h jeeps/gpsutil.h \ jeeps/gpsapp.h jeeps/gpsprot.h jeeps/gpscom.h jeeps/gpsfmt.h \ - jeeps/gpsmath.h jeeps/gpsmem.h jeeps/gpsrqst.h jeeps/gpsinput.h \ + jeeps/gpsmath.h jeeps/gpsmem.h jeeps/gpsrqst.h \ jeeps/gpsproj.h jeeps/garminusb.h jeeps/gpsusbcommon.h jeeps/gpsusbint.h jeeps/gpslibusb.o: jeeps/gpslibusb.cc config.h jeeps/gps.h \ jeeps/../defs.h jeeps/../config.h jeeps/../queue.h zlib/zlib.h \ @@ -731,7 +731,7 @@ jeeps/gpslibusb.o: jeeps/gpslibusb.cc config.h jeeps/gps.h \ jeeps/gpsport.h jeeps/gpsdevice.h jeeps/gpssend.h jeeps/gpsread.h \ jeeps/gpsutil.h jeeps/gpsapp.h jeeps/gpsprot.h jeeps/gpscom.h \ jeeps/gpsfmt.h jeeps/gpsmath.h jeeps/gpsmem.h jeeps/gpsrqst.h \ - jeeps/gpsinput.h jeeps/gpsproj.h jeeps/garminusb.h jeeps/gpsusbcommon.h \ + jeeps/gpsproj.h jeeps/garminusb.h jeeps/gpsusbcommon.h \ jeeps/../garmin_device_xml.h jeeps/gpsmath.o: jeeps/gpsmath.cc jeeps/gps.h jeeps/../defs.h \ jeeps/../config.h jeeps/../queue.h zlib/zlib.h zlib/zconf.h config.h \ @@ -739,7 +739,7 @@ jeeps/gpsmath.o: jeeps/gpsmath.cc jeeps/gps.h jeeps/../defs.h \ jeeps/../session.h jeeps/../src/core/datetime.h jeeps/gpsport.h \ jeeps/gpsdevice.h jeeps/gpssend.h jeeps/gpsread.h jeeps/gpsutil.h \ jeeps/gpsapp.h jeeps/gpsprot.h jeeps/gpscom.h jeeps/gpsfmt.h \ - jeeps/gpsmath.h jeeps/gpsmem.h jeeps/gpsrqst.h jeeps/gpsinput.h \ + jeeps/gpsmath.h jeeps/gpsmem.h jeeps/gpsrqst.h \ jeeps/gpsproj.h jeeps/gpsdatum.h jeeps/gpsmem.o: jeeps/gpsmem.cc jeeps/gps.h jeeps/../defs.h \ jeeps/../config.h jeeps/../queue.h zlib/zlib.h zlib/zconf.h config.h \ @@ -747,7 +747,7 @@ jeeps/gpsmem.o: jeeps/gpsmem.cc jeeps/gps.h jeeps/../defs.h \ jeeps/../session.h jeeps/../src/core/datetime.h jeeps/gpsport.h \ jeeps/gpsdevice.h jeeps/gpssend.h jeeps/gpsread.h jeeps/gpsutil.h \ jeeps/gpsapp.h jeeps/gpsprot.h jeeps/gpscom.h jeeps/gpsfmt.h \ - jeeps/gpsmath.h jeeps/gpsmem.h jeeps/gpsrqst.h jeeps/gpsinput.h \ + jeeps/gpsmath.h jeeps/gpsmem.h jeeps/gpsrqst.h \ jeeps/gpsproj.h jeeps/gpsprot.o: jeeps/gpsprot.cc jeeps/gps.h jeeps/../defs.h \ jeeps/../config.h jeeps/../queue.h zlib/zlib.h zlib/zconf.h config.h \ @@ -755,7 +755,7 @@ jeeps/gpsprot.o: jeeps/gpsprot.cc jeeps/gps.h jeeps/../defs.h \ jeeps/../session.h jeeps/../src/core/datetime.h jeeps/gpsport.h \ jeeps/gpsdevice.h jeeps/gpssend.h jeeps/gpsread.h jeeps/gpsutil.h \ jeeps/gpsapp.h jeeps/gpsprot.h jeeps/gpscom.h jeeps/gpsfmt.h \ - jeeps/gpsmath.h jeeps/gpsmem.h jeeps/gpsrqst.h jeeps/gpsinput.h \ + jeeps/gpsmath.h jeeps/gpsmem.h jeeps/gpsrqst.h \ jeeps/gpsproj.h jeeps/gpsread.o: jeeps/gpsread.cc jeeps/gps.h jeeps/../defs.h \ jeeps/../config.h jeeps/../queue.h zlib/zlib.h zlib/zconf.h config.h \ @@ -763,7 +763,7 @@ jeeps/gpsread.o: jeeps/gpsread.cc jeeps/gps.h jeeps/../defs.h \ jeeps/../session.h jeeps/../src/core/datetime.h jeeps/gpsport.h \ jeeps/gpsdevice.h jeeps/gpssend.h jeeps/gpsread.h jeeps/gpsutil.h \ jeeps/gpsapp.h jeeps/gpsprot.h jeeps/gpscom.h jeeps/gpsfmt.h \ - jeeps/gpsmath.h jeeps/gpsmem.h jeeps/gpsrqst.h jeeps/gpsinput.h \ + jeeps/gpsmath.h jeeps/gpsmem.h jeeps/gpsrqst.h \ jeeps/gpsproj.h jeeps/gpsserial.h jeeps/gpsrqst.o: jeeps/gpsrqst.cc jeeps/gps.h jeeps/../defs.h \ jeeps/../config.h jeeps/../queue.h zlib/zlib.h zlib/zconf.h config.h \ @@ -771,7 +771,7 @@ jeeps/gpsrqst.o: jeeps/gpsrqst.cc jeeps/gps.h jeeps/../defs.h \ jeeps/../session.h jeeps/../src/core/datetime.h jeeps/gpsport.h \ jeeps/gpsdevice.h jeeps/gpssend.h jeeps/gpsread.h jeeps/gpsutil.h \ jeeps/gpsapp.h jeeps/gpsprot.h jeeps/gpscom.h jeeps/gpsfmt.h \ - jeeps/gpsmath.h jeeps/gpsmem.h jeeps/gpsrqst.h jeeps/gpsinput.h \ + jeeps/gpsmath.h jeeps/gpsmem.h jeeps/gpsrqst.h \ jeeps/gpsproj.h jeeps/gpssend.o: jeeps/gpssend.cc jeeps/gps.h jeeps/../defs.h \ jeeps/../config.h jeeps/../queue.h zlib/zlib.h zlib/zconf.h config.h \ @@ -779,7 +779,7 @@ jeeps/gpssend.o: jeeps/gpssend.cc jeeps/gps.h jeeps/../defs.h \ jeeps/../session.h jeeps/../src/core/datetime.h jeeps/gpsport.h \ jeeps/gpsdevice.h jeeps/gpssend.h jeeps/gpsread.h jeeps/gpsutil.h \ jeeps/gpsapp.h jeeps/gpsprot.h jeeps/gpscom.h jeeps/gpsfmt.h \ - jeeps/gpsmath.h jeeps/gpsmem.h jeeps/gpsrqst.h jeeps/gpsinput.h \ + jeeps/gpsmath.h jeeps/gpsmem.h jeeps/gpsrqst.h \ jeeps/gpsproj.h jeeps/gpsserial.h jeeps/gpsserial.o: jeeps/gpsserial.cc jeeps/gps.h jeeps/../defs.h \ jeeps/../config.h jeeps/../queue.h zlib/zlib.h zlib/zconf.h config.h \ @@ -787,7 +787,7 @@ jeeps/gpsserial.o: jeeps/gpsserial.cc jeeps/gps.h jeeps/../defs.h \ jeeps/../session.h jeeps/../src/core/datetime.h jeeps/gpsport.h \ jeeps/gpsdevice.h jeeps/gpssend.h jeeps/gpsread.h jeeps/gpsutil.h \ jeeps/gpsapp.h jeeps/gpsprot.h jeeps/gpscom.h jeeps/gpsfmt.h \ - jeeps/gpsmath.h jeeps/gpsmem.h jeeps/gpsrqst.h jeeps/gpsinput.h \ + jeeps/gpsmath.h jeeps/gpsmem.h jeeps/gpsrqst.h \ jeeps/gpsproj.h jeeps/../gbser.h jeeps/gpsserial.h gbser_posix.h jeeps/gpsusbcommon.o: jeeps/gpsusbcommon.cc jeeps/gps.h jeeps/../defs.h \ jeeps/../config.h jeeps/../queue.h zlib/zlib.h zlib/zconf.h config.h \ @@ -795,7 +795,7 @@ jeeps/gpsusbcommon.o: jeeps/gpsusbcommon.cc jeeps/gps.h jeeps/../defs.h \ jeeps/../session.h jeeps/../src/core/datetime.h jeeps/gpsport.h \ jeeps/gpsdevice.h jeeps/gpssend.h jeeps/gpsread.h jeeps/gpsutil.h \ jeeps/gpsapp.h jeeps/gpsprot.h jeeps/gpscom.h jeeps/gpsfmt.h \ - jeeps/gpsmath.h jeeps/gpsmem.h jeeps/gpsrqst.h jeeps/gpsinput.h \ + jeeps/gpsmath.h jeeps/gpsmem.h jeeps/gpsrqst.h \ jeeps/gpsproj.h jeeps/garminusb.h jeeps/gpsusbcommon.h jeeps/gpsusbread.o: jeeps/gpsusbread.cc jeeps/garminusb.h \ jeeps/gpsdevice.h jeeps/gps.h jeeps/../defs.h jeeps/../config.h \ @@ -804,14 +804,14 @@ jeeps/gpsusbread.o: jeeps/gpsusbread.cc jeeps/garminusb.h \ jeeps/../src/core/datetime.h jeeps/gpsport.h jeeps/gpssend.h \ jeeps/gpsread.h jeeps/gpsutil.h jeeps/gpsapp.h jeeps/gpsprot.h \ jeeps/gpscom.h jeeps/gpsfmt.h jeeps/gpsmath.h jeeps/gpsmem.h \ - jeeps/gpsrqst.h jeeps/gpsinput.h jeeps/gpsproj.h jeeps/gpsusbint.h + jeeps/gpsrqst.h jeeps/gpsproj.h jeeps/gpsusbint.h jeeps/gpsusbsend.o: jeeps/gpsusbsend.cc jeeps/gps.h jeeps/../defs.h \ jeeps/../config.h jeeps/../queue.h zlib/zlib.h zlib/zconf.h config.h \ jeeps/../gbfile.h jeeps/../defs.h jeeps/../cet.h jeeps/../inifile.h \ jeeps/../session.h jeeps/../src/core/datetime.h jeeps/gpsport.h \ jeeps/gpsdevice.h jeeps/gpssend.h jeeps/gpsread.h jeeps/gpsutil.h \ jeeps/gpsapp.h jeeps/gpsprot.h jeeps/gpscom.h jeeps/gpsfmt.h \ - jeeps/gpsmath.h jeeps/gpsmem.h jeeps/gpsrqst.h jeeps/gpsinput.h \ + jeeps/gpsmath.h jeeps/gpsmem.h jeeps/gpsrqst.h \ jeeps/gpsproj.h jeeps/garminusb.h jeeps/gpsusbint.h jeeps/jgpsutil.o: jeeps/jgpsutil.cc jeeps/gps.h jeeps/../defs.h \ jeeps/../config.h jeeps/../queue.h zlib/zlib.h zlib/zconf.h config.h \ @@ -819,7 +819,7 @@ jeeps/jgpsutil.o: jeeps/jgpsutil.cc jeeps/gps.h jeeps/../defs.h \ jeeps/../session.h jeeps/../src/core/datetime.h jeeps/gpsport.h \ jeeps/gpsdevice.h jeeps/gpssend.h jeeps/gpsread.h jeeps/gpsutil.h \ jeeps/gpsapp.h jeeps/gpsprot.h jeeps/gpscom.h jeeps/gpsfmt.h \ - jeeps/gpsmath.h jeeps/gpsmem.h jeeps/gpsrqst.h jeeps/gpsinput.h \ + jeeps/gpsmath.h jeeps/gpsmem.h jeeps/gpsrqst.h \ jeeps/gpsproj.h jogmap.o: jogmap.cc defs.h config.h queue.h zlib/zlib.h zlib/zconf.h \ config.h gbfile.h cet.h inifile.h session.h src/core/datetime.h \ @@ -938,7 +938,7 @@ random.o: random.cc defs.h config.h queue.h zlib/zlib.h zlib/zconf.h \ jeeps/gpsdevice.h jeeps/gps.h jeeps/gpssend.h jeeps/gpsread.h \ jeeps/gpsutil.h jeeps/gpsapp.h jeeps/gpsprot.h jeeps/gpscom.h \ jeeps/gpsfmt.h jeeps/gpsmath.h jeeps/gpsmem.h jeeps/gpsrqst.h \ - jeeps/gpsinput.h jeeps/gpsproj.h jeeps/gpsmath.h + jeeps/gpsproj.h jeeps/gpsmath.h raymarine.o: raymarine.cc defs.h config.h queue.h zlib/zlib.h \ zlib/zconf.h config.h gbfile.h cet.h inifile.h session.h \ src/core/datetime.h cet_util.h csv_util.h @@ -1034,7 +1034,7 @@ unicsv.o: unicsv.cc defs.h config.h queue.h zlib/zlib.h zlib/zconf.h \ jeeps/gpsport.h jeeps/gpsdevice.h jeeps/gps.h jeeps/gpssend.h \ jeeps/gpsread.h jeeps/gpsutil.h jeeps/gpsapp.h jeeps/gpsprot.h \ jeeps/gpscom.h jeeps/gpsfmt.h jeeps/gpsmath.h jeeps/gpsmem.h \ - jeeps/gpsrqst.h jeeps/gpsinput.h jeeps/gpsproj.h garmin_tables.h \ + jeeps/gpsrqst.h jeeps/gpsproj.h garmin_tables.h \ jeeps/gpsmath.h src/core/logging.h units.o: units.cc defs.h config.h queue.h zlib/zlib.h zlib/zconf.h \ config.h gbfile.h cet.h inifile.h session.h src/core/datetime.h @@ -1068,7 +1068,7 @@ waypt.o: waypt.cc defs.h config.h queue.h zlib/zlib.h zlib/zconf.h \ jeeps/gpsdevice.h jeeps/gps.h jeeps/gpssend.h jeeps/gpsread.h \ jeeps/gpsutil.h jeeps/gpsapp.h jeeps/gpsprot.h jeeps/gpscom.h \ jeeps/gpsfmt.h jeeps/gpsmath.h jeeps/gpsmem.h jeeps/gpsrqst.h \ - jeeps/gpsinput.h jeeps/gpsproj.h grtcirc.h src/core/logging.h + jeeps/gpsproj.h grtcirc.h src/core/logging.h wbt-200.o: wbt-200.cc defs.h config.h queue.h zlib/zlib.h zlib/zconf.h \ config.h gbfile.h cet.h inifile.h session.h src/core/datetime.h gbser.h \ grtcirc.h diff --git a/jeeps/gps.h b/jeeps/gps.h index a33f1fb80..7921f2559 100644 --- a/jeeps/gps.h +++ b/jeeps/gps.h @@ -263,7 +263,6 @@ typedef int (*pcb_fn)(int, struct GPS_SWay**); #include "gpsmath.h" #include "gpsmem.h" #include "gpsrqst.h" -#include "gpsinput.h" #include "gpsproj.h" extern time_t gps_save_time; diff --git a/jeeps/gpsinput.cc b/jeeps/gpsinput.cc deleted file mode 100644 index 4246160ae..000000000 --- a/jeeps/gpsinput.cc +++ /dev/null @@ -1,2608 +0,0 @@ -/******************************************************************** -** @source JEEPS input functions -** -** @author Copyright (C) 1999 Alan Bleasby -** @version 1.0 -** @modified Dec 28 1999 Alan Bleasby. First version -** @@ -** -** This library is free software; you can redistribute it and/or -** modify it under the terms of the GNU Library General Public -** License as published by the Free Software Foundation; either -** version 2 of the License, or (at your option) any later version. -** -** This library is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of -** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -** Library General Public License for more details. -** -** You should have received a copy of the GNU Library General Public -** License along with this library; if not, write to the -** Free Software Foundation, Inc., 59 Temple Place - Suite 330, -** Boston, MA 02111-1307, USA. -********************************************************************/ -#include "gps.h" -#include -#include -#include -#include - - -static int32 GPS_Input_Load_String(char* t, int32 n, char* s); -static int32 GPS_Input_Load_Strnull(char* t, char* s); -static int32 GPS_Input_Read_Line(char* s, FILE* inf); - -static int32 GPS_Input_Get_D100(GPS_PWay* way, FILE* inf); -static int32 GPS_Input_Get_D101(GPS_PWay* way, FILE* inf); -static int32 GPS_Input_Get_D102(GPS_PWay* way, FILE* inf); -static int32 GPS_Input_Get_D103(GPS_PWay* way, FILE* inf); -static int32 GPS_Input_Get_D104(GPS_PWay* way, FILE* inf); -static int32 GPS_Input_Get_D105(GPS_PWay* way, FILE* inf); -static int32 GPS_Input_Get_D106(GPS_PWay* way, FILE* inf); -static int32 GPS_Input_Get_D107(GPS_PWay* way, FILE* inf); -static int32 GPS_Input_Get_D108(GPS_PWay* way, FILE* inf); -static int32 GPS_Input_Get_D109(GPS_PWay* way, FILE* inf, int protonum); -static int32 GPS_Input_Get_D150(GPS_PWay* way, FILE* inf); -static int32 GPS_Input_Get_D151(GPS_PWay* way, FILE* inf); -static int32 GPS_Input_Get_D152(GPS_PWay* way, FILE* inf); -static int32 GPS_Input_Get_D154(GPS_PWay* way, FILE* inf); -static int32 GPS_Input_Get_D155(GPS_PWay* way, FILE* inf); - -static int32 GPS_Input_Get_Track301(GPS_PTrack** trk, FILE* inf, int32 type, - int32 n); -static int32 GPS_Input_Get_D300(GPS_PTrack* trk, FILE* inf, char* s); -static int32 GPS_Input_Get_D301(GPS_PTrack* trk, FILE* inf, char* s); - -static int32 GPS_Input_Get_Route201(GPS_PWay** way, FILE* inf); - - -/* @funcstatic GPS_Input_Load_String *********************************** -** -** Load a GPS char type from an input line -** Remove trailing newline -** -** @param [w] t [char *] string to load -** @param [r] n [int32] maximum type length -** @param [r] s [char *] source line -** -** @return [int32] success -************************************************************************/ -static int32 GPS_Input_Load_String(char* t, int32 n, char* s) -{ - char* p; - char* q; - - int32 len; - int32 i; - - gps_errno = INPUT_ERROR; - - p=s; - if (!(p=strchr(p,':'))) { - return gps_errno; - } - ++p; - while (*p && (*p==' ' || *p=='\t')) { - ++p; - } - if (!*p) { - return 0; - } - - len = strlen(p); - q = p+len-1; - while (*q==' ' || *q=='\t') { - --q; - } - len = q-p+1; - - if (q-p+1 > n) { - len = n; - p[n]='\0'; - } - for (i=0; isvid = i; - (*alm)[i]->wn = -1; - } - } else { - if (!(*alm = (GPS_PAlmanac*) malloc(n*sizeof(GPS_PAlmanac*)))) { - return MEMORY_ERROR; - } - for (i=0; i<32; ++i) - if (!((*alm)[i] = GPS_Almanac_New())) { - return MEMORY_ERROR; - } - } - - for (i=0; isvid!=d) { - ++i; - } - (*alm)[i]->svid=d; - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - p=strchr(s,':'); - if (sscanf(p+1,"%d",(int*)&d)!=1) { - return gps_errno; - } - (*alm)[i]->wn = d; - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - p=strchr(s,':'); - if (sscanf(p+1,"%f",&f)!=1) { - return gps_errno; - } - (*alm)[i]->toa = f; - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - p=strchr(s,':'); - if (sscanf(p+1,"%f",&f)!=1) { - return gps_errno; - } - (*alm)[i]->af0 = f; - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - p=strchr(s,':'); - if (sscanf(p+1,"%f",&f)!=1) { - return gps_errno; - } - (*alm)[i]->af1 = f; - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - p=strchr(s,':'); - if (sscanf(p+1,"%f",&f)!=1) { - return gps_errno; - } - (*alm)[i]->e = f; - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - p=strchr(s,':'); - if (sscanf(p+1,"%f",&f)!=1) { - return gps_errno; - } - (*alm)[i]->sqrta = f; - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - p=strchr(s,':'); - if (sscanf(p+1,"%f",&f)!=1) { - return gps_errno; - } - (*alm)[i]->m0 = f; - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - p=strchr(s,':'); - if (sscanf(p+1,"%f",&f)!=1) { - return gps_errno; - } - (*alm)[i]->w = f; - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - p=strchr(s,':'); - if (sscanf(p+1,"%f",&f)!=1) { - return gps_errno; - } - (*alm)[i]->omg0 = f; - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - p=strchr(s,':'); - if (sscanf(p+1,"%f",&f)!=1) { - return gps_errno; - } - (*alm)[i]->odot = f; - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - p=strchr(s,':'); - if (sscanf(p+1,"%f",&f)!=1) { - return gps_errno; - } - (*alm)[i]->i = f; - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - p=strchr(s,':'); - if (sscanf(p+1,"%d",(int*)&d)!=1) { - return gps_errno; - } - (*alm)[i]->hlth=d; - } - - if (!type) { - n = 32; - } - - return n; -} - - - -/* @func GPS_Input_Get_Waypoint ***************************************** -** -** Construct a waypoint array from a file -** -** @param [w] way [GPS_PWay **] pointer to waypoint array -** @param [r] inf [FILE *] stream -** -** @return [int32] number of entries -************************************************************************/ - -int32 GPS_Input_Get_Waypoint(GPS_PWay** way, FILE* inf) -{ - char s[GPS_ARB_LEN]; - int32 n; - int32 type; - int32 i; - long pos; - int32 ret; - - gps_errno = INPUT_ERROR; - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - if (sscanf(s,"Waypoints Type: %d",(int*)&type)!=1) { - return gps_errno; - } - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - if (strncmp(s,"Start",5)) { - return gps_errno; - } - - pos = ftell(inf); - n = 0; - while (strncmp(s,"End",3)) { - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - if (strstr(s,"Latitude")) { - ++n; - } - } - fseek(inf,pos,0); - - if (!(*way=(GPS_PWay*)malloc(n*sizeof(GPS_PWay*)))) { - return MEMORY_ERROR; - } - for (i=0; iprot = type; - } - - - for (i=0; iprot = type; - } - - for (i=0; idst = f; - } - - return n; -} - - - -/* @funcstatic GPS_Input_Get_D100 ************************************ -** -** Get a D100 Entry -** -** @param [w] way [GPS_PWay *] pointer to waypoint entry -** @param [r] inf [FILE *] stream -** -** @return [int32] number of entries -************************************************************************/ -static int32 GPS_Input_Get_D100(GPS_PWay* way, FILE* inf) -{ - char s[GPS_ARB_LEN]; - char* p; - - double f; - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - GPS_Input_Load_String((*way)->ident,6,s); - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - p=strchr(s,':'); - if (sscanf(p+1,"%lf",&f)!=1) { - return gps_errno; - } - (*way)->lat = f; - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - p=strchr(s,':'); - if (sscanf(p+1,"%lf",&f)!=1) { - return gps_errno; - } - (*way)->lon = f; - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - GPS_Input_Load_String((*way)->cmnt,40,s); - - return 1; -} - - - -/* @funcstatic GPS_Input_Get_D101 ************************************ -** -** Get a D101 Entry -** -** @param [w] way [GPS_PWay *] pointer to waypoint entry -** @param [r] inf [FILE *] stream -** -** @return [int32] number of entries -************************************************************************/ -static int32 GPS_Input_Get_D101(GPS_PWay* way, FILE* inf) -{ - char s[GPS_ARB_LEN]; - char* p; - - double f; - int32 d; - - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - GPS_Input_Load_String((*way)->ident,6,s); - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - p=strchr(s,':'); - if (sscanf(p+1,"%lf",&f)!=1) { - return gps_errno; - } - (*way)->lat = f; - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - p=strchr(s,':'); - if (sscanf(p+1,"%lf",&f)!=1) { - return gps_errno; - } - (*way)->lon = f; - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - GPS_Input_Load_String((*way)->cmnt,40,s); - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - p=strchr(s,':'); - if (sscanf(p+1,"%d",(int*)&d)!=1) { - return gps_errno; - } - (*way)->smbl = d; - - return 1; -} - - - -/* @funcstatic GPS_Input_Get_D102 ************************************ -** -** Get a D102 Entry -** -** @param [w] way [GPS_PWay *] pointer to waypoint entry -** @param [r] inf [FILE *] stream -** -** @return [int32] number of entries -************************************************************************/ -static int32 GPS_Input_Get_D102(GPS_PWay* way, FILE* inf) -{ - return GPS_Input_Get_D101(way,inf); -} - - - -/* @funcstatic GPS_Input_Get_D103 ************************************ -** -** Get a D103 Entry -** -** @param [w] way [GPS_PWay *] pointer to waypoint entry -** @param [r] inf [FILE *] stream -** -** @return [int32] number of entries -************************************************************************/ -static int32 GPS_Input_Get_D103(GPS_PWay* way, FILE* inf) -{ - char s[GPS_ARB_LEN]; - char* p; - - double f; - int32 d; - - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - GPS_Input_Load_String((*way)->ident,6,s); - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - p=strchr(s,':'); - if (sscanf(p+1,"%lf",&f)!=1) { - return gps_errno; - } - (*way)->lat = f; - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - p=strchr(s,':'); - if (sscanf(p+1,"%lf",&f)!=1) { - return gps_errno; - } - (*way)->lon = f; - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - GPS_Input_Load_String((*way)->cmnt,40,s); - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - p=strchr(s,':'); - if (sscanf(p+1,"%d",(int*)&d)!=1) { - return gps_errno; - } - (*way)->smbl = d; - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - p=strchr(s,':'); - if (sscanf(p+1,"%d",(int*)&d)!=1) { - return gps_errno; - } - (*way)->dspl = d; - - return 1; -} - - - -/* @funcstatic GPS_Input_Get_D104 ************************************ -** -** Get a D104 Entry -** -** @param [w] way [GPS_PWay *] pointer to waypoint entry -** @param [r] inf [FILE *] stream -** -** @return [int32] number of entries -************************************************************************/ -static int32 GPS_Input_Get_D104(GPS_PWay* way, FILE* inf) -{ - return GPS_Input_Get_D103(way,inf); -} - - - -/* @funcstatic GPS_Input_Get_D105 ************************************ -** -** Get a D105 Entry -** -** @param [w] way [GPS_PWay *] pointer to waypoint entry -** @param [r] inf [FILE *] stream -** -** @return [int32] number of entries -************************************************************************/ -static int32 GPS_Input_Get_D105(GPS_PWay* way, FILE* inf) -{ - char s[GPS_ARB_LEN]; - char* p; - - double f; - int32 d; - - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - p=strchr(s,':'); - if (sscanf(p+1,"%lf",&f)!=1) { - return gps_errno; - } - (*way)->lat = f; - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - p=strchr(s,':'); - if (sscanf(p+1,"%lf",&f)!=1) { - return gps_errno; - } - (*way)->lon = f; - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - p=strchr(s,':'); - if (sscanf(p+1,"%d",(int*)&d)!=1) { - return gps_errno; - } - (*way)->smbl = d; - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - GPS_Input_Load_Strnull((*way)->wpt_ident,s); - - return 1; -} - - - -/* @funcstatic GPS_Input_Get_D106 ************************************ -** -** Get a D106 Entry -** -** @param [w] way [GPS_PWay *] pointer to waypoint entry -** @param [r] inf [FILE *] stream -** -** @return [int32] number of entries -************************************************************************/ -static int32 GPS_Input_Get_D106(GPS_PWay* way, FILE* inf) -{ - char s[GPS_ARB_LEN]; - char* p; - - double f; - int32 d; - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - p=strchr(s,':'); - if (sscanf(p+1,"%d",(int*)&d)!=1) { - return gps_errno; - } - (*way)->wpt_class = d; - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - GPS_Input_Load_String((char*)(*way)->subclass,13,s); - - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - GPS_Input_Load_String((*way)->ident,6,s); - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - p=strchr(s,':'); - if (sscanf(p+1,"%lf",&f)!=1) { - return gps_errno; - } - (*way)->lat = f; - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - p=strchr(s,':'); - if (sscanf(p+1,"%lf",&f)!=1) { - return gps_errno; - } - (*way)->lon = f; - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - p=strchr(s,':'); - if (sscanf(p+1,"%d",(int*)&d)!=1) { - return gps_errno; - } - (*way)->smbl = d; - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - GPS_Input_Load_Strnull((*way)->wpt_ident,s); - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - GPS_Input_Load_Strnull((*way)->lnk_ident,s); - - return 1; -} - - - -/* @funcstatic GPS_Input_Get_D107 ************************************ -** -** Get a D107 Entry -** -** @param [w] way [GPS_PWay *] pointer to waypoint entry -** @param [r] inf [FILE *] stream -** -** @return [int32] number of entries -************************************************************************/ -static int32 GPS_Input_Get_D107(GPS_PWay* way, FILE* inf) -{ - char s[GPS_ARB_LEN]; - char* p; - - int32 d; - int32 ret; - - if ((ret=GPS_Input_Get_D103(way,inf))<0) { - return ret; - } - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - p=strchr(s,':'); - if (sscanf(p+1,"%d",(int*)&d)!=1) { - return gps_errno; - } - (*way)->colour = d; - - return 1; -} - - - -/* @funcstatic GPS_Input_Get_D108 ************************************ -** -** Get a D108 Entry -** -** @param [w] way [GPS_PWay *] pointer to waypoint entry -** @param [r] inf [FILE *] stream -** -** @return [int32] number of entries -************************************************************************/ -static int32 GPS_Input_Get_D108(GPS_PWay* way, FILE* inf) -{ - char s[GPS_ARB_LEN]; - char* p; - double f; - int32 d; - int32 xc; - - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - GPS_Input_Load_Strnull((*way)->ident,s); - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - p=strchr(s,':'); - if (sscanf(p+1,"%lf",&f)!=1) { - return gps_errno; - } - (*way)->lat = f; - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - p=strchr(s,':'); - if (sscanf(p+1,"%lf",&f)!=1) { - return gps_errno; - } - (*way)->lon = f; - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - p=strchr(s,':'); - if (sscanf(p+1,"%d",(int*)&d)!=1) { - return gps_errno; - } - (*way)->colour = d; - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - p=strchr(s,':'); - if (sscanf(p+1,"%d",(int*)&d)!=1) { - return gps_errno; - } - (*way)->dspl = d; - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - p=strchr(s,':'); - if (sscanf(p+1,"%d",(int*)&d)!=1) { - return gps_errno; - } - (*way)->smbl = d; - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - p=strchr(s,':'); - if (sscanf(p+1,"%d",(int*)&d)!=1) { - return gps_errno; - } - (*way)->alt = d; - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - p=strchr(s,':'); - if (sscanf(p+1,"%lf",&f)!=1) { - return gps_errno; - } - (*way)->dpth = f; - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - GPS_Input_Load_String((*way)->state,2,s); - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - GPS_Input_Load_String((*way)->cc,2,s); - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - p=strchr(s,':'); - if (sscanf(p+1,"%d",(int*)&d)!=1) { - return gps_errno; - } - (*way)->wpt_class = d; - xc = d; - - if (xc>=0x80 && xc<=0x85) { - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - GPS_Input_Load_String((char*)(*way)->subclass,18,s); - } else { - GPS_Util_Put_Short((*way)->subclass,0); - GPS_Util_Put_Int((*way)->subclass+2,0); - GPS_Util_Put_Uint((*way)->subclass+6,0xffffffff); - GPS_Util_Put_Uint((*way)->subclass+10,0xffffffff); - GPS_Util_Put_Uint((*way)->subclass+14,0xffffffff); - } - - if (!xc) { - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - GPS_Input_Load_Strnull((*way)->cmnt,s); - } - - if (xc>=0x40 && xc<=0x46) { - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - GPS_Input_Load_Strnull((*way)->facility,s); - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - GPS_Input_Load_Strnull((*way)->city,s); - } - - if (xc==0x83) { - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - GPS_Input_Load_Strnull((*way)->addr,s); - } - - if (xc==0x82) { - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - GPS_Input_Load_Strnull((*way)->cross_road,s); - } - - return 1; -} - - - -/* @funcstatic GPS_Input_Get_D109 ************************************ -** -** Get a D109 Entry -** -** @param [w] way [GPS_PWay *] pointer to waypoint entry -** @param [r] inf [FILE *] stream -** -** @return [int32] number of entries -** D109's and D110's are so similar, we handle both with the same function. -************************************************************************/ -static int32 GPS_Input_Get_D109(GPS_PWay* way, FILE* inf, int protonum) -{ - char s[GPS_ARB_LEN]; - char* p; - double f; - int32 d; - int32 xc; - - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - GPS_Input_Load_Strnull((*way)->ident,s); - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - p=strchr(s,':'); - if (sscanf(p+1,"%lf",&f)!=1) { - return gps_errno; - } - (*way)->lat = f; - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - p=strchr(s,':'); - if (sscanf(p+1,"%lf",&f)!=1) { - return gps_errno; - } - (*way)->lon = f; - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - p=strchr(s,':'); - if (sscanf(p+1,"%d",(int*)&d)!=1) { - return gps_errno; - } - (*way)->colour = d; - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - p=strchr(s,':'); - if (sscanf(p+1,"%d",(int*)&d)!=1) { - return gps_errno; - } - (*way)->dspl = d; - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - p=strchr(s,':'); - if (sscanf(p+1,"%d",(int*)&d)!=1) { - return gps_errno; - } - (*way)->smbl = d; - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - p=strchr(s,':'); - if (sscanf(p+1,"%d",(int*)&d)!=1) { - return gps_errno; - } - (*way)->alt = d; - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - p=strchr(s,':'); - if (sscanf(p+1,"%lf",&f)!=1) { - return gps_errno; - } - (*way)->dpth = f; - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - GPS_Input_Load_String((*way)->state,2,s); - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - GPS_Input_Load_String((*way)->cc,2,s); - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - p=strchr(s,':'); - if (sscanf(p+1,"%d",(int*)&d)!=1) { - return gps_errno; - } - (*way)->wpt_class = d; - xc = d; - - if (xc>=0x80 && xc<=0x85) { - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - GPS_Input_Load_String((char*)(*way)->subclass,18,s); - } else { - GPS_Util_Put_Short((*way)->subclass,0); - GPS_Util_Put_Int((*way)->subclass+2,0); - GPS_Util_Put_Uint((*way)->subclass+6,0xffffffff); - GPS_Util_Put_Uint((*way)->subclass+10,0xffffffff); - GPS_Util_Put_Uint((*way)->subclass+14,0xffffffff); - } - - if (!xc) { - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - GPS_Input_Load_Strnull((*way)->cmnt,s); - } - - if (xc>=0x40 && xc<=0x46) { - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - GPS_Input_Load_Strnull((*way)->facility,s); - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - GPS_Input_Load_Strnull((*way)->city,s); - } - - if (xc==0x83) { - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - GPS_Input_Load_Strnull((*way)->addr,s); - } - - if (xc==0x82) { - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - GPS_Input_Load_Strnull((*way)->cross_road,s); - } - - return 1; -} - - -/* @funcstatic GPS_Input_Get_D150 ************************************ -** -** Get a D150 Entry -** -** @param [w] way [GPS_PWay *] pointer to waypoint entry -** @param [r] inf [FILE *] stream -** -** @return [int32] number of entries -************************************************************************/ -static int32 GPS_Input_Get_D150(GPS_PWay* way, FILE* inf) -{ - char s[GPS_ARB_LEN]; - char* p; - - double f; - int32 d; - int32 cl=0; - - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - GPS_Input_Load_String((*way)->ident,6,s); - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - p=strchr(s,':'); - if (sscanf(p+1,"%lf",&f)!=1) { - return gps_errno; - } - (*way)->lat = f; - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - p=strchr(s,':'); - if (sscanf(p+1,"%lf",&f)!=1) { - return gps_errno; - } - (*way)->lon = f; - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - GPS_Input_Load_String((*way)->cmnt,40,s); - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - p=strchr(s,':'); - if (sscanf(p+1,"%d",(int*)&d)!=1) { - return gps_errno; - } - (*way)->wpt_class = cl = d; - - if (cl != 4) { - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - GPS_Input_Load_String((*way)->cc,2,s); - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - GPS_Input_Load_String((*way)->city,24,s); - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - GPS_Input_Load_String((*way)->state,2,s); - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - GPS_Input_Load_String((*way)->name,30,s); - } - - if (!cl) { - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - p=strchr(s,':'); - if (sscanf(p+1,"%d",(int*)&d)!=1) { - return gps_errno; - } - (*way)->alt = d; - } - - return 1; -} - - - -/* @funcstatic GPS_Input_Get_D151 ************************************ -** -** Get a D151 Entry -** -** @param [w] way [GPS_PWay *] pointer to waypoint entry -** @param [r] inf [FILE *] stream -** -** @return [int32] number of entries -************************************************************************/ -static int32 GPS_Input_Get_D151(GPS_PWay* way, FILE* inf) -{ - char s[GPS_ARB_LEN]; - char* p; - - double f; - int32 d; - int32 cl=0; - - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - GPS_Input_Load_String((*way)->ident,6,s); - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - p=strchr(s,':'); - if (sscanf(p+1,"%lf",&f)!=1) { - return gps_errno; - } - (*way)->lat = f; - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - p=strchr(s,':'); - if (sscanf(p+1,"%lf",&f)!=1) { - return gps_errno; - } - (*way)->lon = f; - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - GPS_Input_Load_String((*way)->cmnt,40,s); - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - p=strchr(s,':'); - if (sscanf(p+1,"%d",(int*)&d)!=1) { - return gps_errno; - } - (*way)->wpt_class = cl = d; - - if (cl != 2) { - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - GPS_Input_Load_String((*way)->cc,2,s); - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - GPS_Input_Load_String((*way)->city,24,s); - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - GPS_Input_Load_String((*way)->state,2,s); - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - GPS_Input_Load_String((*way)->name,30,s); - } - - if (!cl) { - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - p=strchr(s,':'); - if (sscanf(p+1,"%d",(int*)&d)!=1) { - return gps_errno; - } - (*way)->alt = d; - } - - return 1; -} - - -/* @funcstatic GPS_Input_Get_D152 ************************************ -** -** Get a D152 Entry -** -** @param [w] way [GPS_PWay *] pointer to waypoint entry -** @param [r] inf [FILE *] stream -** -** @return [int32] number of entries -************************************************************************/ -static int32 GPS_Input_Get_D152(GPS_PWay* way, FILE* inf) -{ - return GPS_Input_Get_D150(way,inf); -} - - - -/* @funcstatic GPS_Input_Get_D154 ************************************ -** -** Get a D154 Entry -** -** @param [w] way [GPS_PWay *] pointer to waypoint entry -** @param [r] inf [FILE *] stream -** -** @return [int32] number of entries -************************************************************************/ -static int32 GPS_Input_Get_D154(GPS_PWay* way, FILE* inf) -{ - char s[GPS_ARB_LEN]; - char* p; - - double f; - int32 d; - int32 cl=0; - - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - GPS_Input_Load_String((*way)->ident,6,s); - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - p=strchr(s,':'); - if (sscanf(p+1,"%lf",&f)!=1) { - return gps_errno; - } - (*way)->lat = f; - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - p=strchr(s,':'); - if (sscanf(p+1,"%lf",&f)!=1) { - return gps_errno; - } - (*way)->lon = f; - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - GPS_Input_Load_String((*way)->cmnt,40,s); - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - p=strchr(s,':'); - if (sscanf(p+1,"%d",(int*)&d)!=1) { - return gps_errno; - } - (*way)->smbl = d; - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - p=strchr(s,':'); - if (sscanf(p+1,"%d",(int*)&d)!=1) { - return gps_errno; - } - (*way)->wpt_class = cl = d; - - if (cl != 4 && cl != 8) { - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - GPS_Input_Load_String((*way)->cc,2,s); - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - GPS_Input_Load_String((*way)->city,24,s); - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - GPS_Input_Load_String((*way)->state,2,s); - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - GPS_Input_Load_String((*way)->name,30,s); - } - - if (!cl) { - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - p=strchr(s,':'); - if (sscanf(p+1,"%d",(int*)&d)!=1) { - return gps_errno; - } - (*way)->alt = d; - } - - return 1; -} - - - -/* @funcstatic GPS_Input_Get_D155 ************************************ -** -** Get a D155 Entry -** -** @param [w] way [GPS_PWay *] pointer to waypoint entry -** @param [r] inf [FILE *] stream -** -** @return [int32] number of entries -************************************************************************/ -static int32 GPS_Input_Get_D155(GPS_PWay* way, FILE* inf) -{ - char s[GPS_ARB_LEN]; - char* p; - - double f; - int32 d; - int32 cl=0; - - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - GPS_Input_Load_String((*way)->ident,6,s); - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - p=strchr(s,':'); - if (sscanf(p+1,"%lf",&f)!=1) { - return gps_errno; - } - (*way)->lat = f; - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - p=strchr(s,':'); - if (sscanf(p+1,"%lf",&f)!=1) { - return gps_errno; - } - (*way)->lon = f; - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - GPS_Input_Load_String((*way)->cmnt,40,s); - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - p=strchr(s,':'); - if (sscanf(p+1,"%d",(int*)&d)!=1) { - return gps_errno; - } - (*way)->smbl = d; - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - p=strchr(s,':'); - if (sscanf(p+1,"%d",(int*)&d)!=1) { - return gps_errno; - } - (*way)->dspl = d; - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - p=strchr(s,':'); - if (sscanf(p+1,"%d",(int*)&d)!=1) { - return gps_errno; - } - (*way)->wpt_class = cl = d; - - if (cl != 4 && cl != 8) { - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - GPS_Input_Load_String((*way)->cc,2,s); - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - GPS_Input_Load_String((*way)->city,24,s); - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - GPS_Input_Load_String((*way)->state,2,s); - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - GPS_Input_Load_String((*way)->name,30,s); - } - - if (!cl) { - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - p=strchr(s,':'); - if (sscanf(p+1,"%d",(int*)&d)!=1) { - return gps_errno; - } - (*way)->alt = d; - } - - return 1; -} - - - -/* @func GPS_Input_Get_Track ******************************************* -** -** Construct a travk array from a file -** -** @param [w] trk [GPS_PTrack **] pointer to track array -** @param [r] inf [FILE *] stream -** -** @return [int32] number of entries -************************************************************************/ - -int32 GPS_Input_Get_Track(GPS_PTrack** trk, FILE* inf) -{ - char s[GPS_ARB_LEN]; - int32 n; - int32 i; - long pos; - int32 a; - int32 d; - - gps_errno = INPUT_ERROR; - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - if (strncmp(s,"Track log",9)) { - return gps_errno; - } - - if (sscanf(s,"Track log %d%d",(int*)&a,(int*)&d)!=2) { - return INPUT_ERROR; - } - - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - if (strncmp(s,"Start",5)) { - return gps_errno; - } - - pos = ftell(inf); - n = 0; - while (strncmp(s,"End",3)) { - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - if (strstr(s,"Latitude")) { - ++n; - } - if (strstr(s,"Header")) { - ++n; - } - } - fseek(inf,pos,0); - - - if (!(*trk=(GPS_PTrack*)malloc(n*sizeof(GPS_PTrack*)))) { - return MEMORY_ERROR; - } - for (i=0; itnew=1; - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - } else { - (*trk)[i]->tnew=0; - } - - switch (d) { - case pD300: - GPS_Input_Get_D300(&((*trk)[i]),inf,s); - break; - case pD301: - GPS_Input_Get_D301(&((*trk)[i]),inf,s); - break; - default: - return PROTOCOL_ERROR; - } - } - - return n; -} - - - -/* @funcstatic GPS_Input_Get_Track301 ********************************** -** -** Construct a travk array from a file -** -** @param [w] trk [GPS_PTrack **] pointer to track array -** @param [r] inf [FILE *] stream -** @param [r] type [int32] data type -** @param [r] n [int32] number of tracks -** -** @return [int32] number of entries -************************************************************************/ - -static int32 GPS_Input_Get_Track301(GPS_PTrack** trk, FILE* inf, int32 type, - int32 n) -{ - char s[GPS_ARB_LEN]; - int32 i; - char* p; - int32 x; - - for (i=0; iishdr = 1; - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - GPS_Input_Load_Strnull((*trk)[i]->trk_ident,s); - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - p=strchr(s,':'); - if (sscanf(p+1,"%d",(int*)&x)!=1) { - return INPUT_ERROR; - } - (*trk)[i]->dspl = x; - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - p=strchr(s,':'); - if (sscanf(p+1,"%d",(int*)&x)!=1) { - return INPUT_ERROR; - } - (*trk)[i]->colour = x; - - continue; - } - - (*trk)[i]->ishdr = 0; - - if (!strcmp(s,"New track")) { - (*trk)[i]->tnew=1; - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - } else { - (*trk)[i]->tnew=0; - } - - switch (type) { - case pD300: - GPS_Input_Get_D300(&((*trk)[i]),inf,s); - break; - case pD301: - GPS_Input_Get_D301(&((*trk)[i]),inf,s); - break; - default: - return PROTOCOL_ERROR; - } - } - - return n; -} - - - -/* @funcstatic GPS_Input_Get_D300 ********************************** -** -** Construct a track from a file -** -** @param [w] trk [GPS_PTrack *] pointer to track -** @param [r] inf [FILE *] stream -** @param [w] s [char *] input line -** -** @return [int32] number of entries -************************************************************************/ - -static int32 GPS_Input_Get_D300(GPS_PTrack* trk, FILE* inf, char* s) -{ - char* p; - double f; - - p=strchr(s,':'); - if (sscanf(p+1,"%lf",&f)!=1) { - return gps_errno; - } - (*trk)->lat = f; - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - p=strchr(s,':'); - if (sscanf(p+1,"%lf",&f)!=1) { - return gps_errno; - } - (*trk)->lon = f; - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - (*trk)->Time = 0; - - return 1; -} - - - -/* @funcstatic GPS_Input_Get_D301 ********************************** -** -** Construct a track from a file -** -** @param [w] trk [GPS_PTrack *] pointer to track -** @param [r] inf [FILE *] stream -** @param [w] s [char *] input line -** -** @return [int32] number of entries -************************************************************************/ - -static int32 GPS_Input_Get_D301(GPS_PTrack* trk, FILE* inf, char* s) -{ - char* p; - double f; - - p=strchr(s,':'); - if (sscanf(p+1,"%lf",&f)!=1) { - return gps_errno; - } - (*trk)->lat = f; - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - p=strchr(s,':'); - if (sscanf(p+1,"%lf",&f)!=1) { - return gps_errno; - } - (*trk)->lon = f; - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - (*trk)->Time = 0; - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - p=strchr(s,':'); - if (sscanf(p+1,"%lf",&f)!=1) { - return gps_errno; - } - (*trk)->alt = f; - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - p=strchr(s,':'); - if (sscanf(p+1,"%lf",&f)!=1) { - return gps_errno; - } - (*trk)->dpth = f; - - return 1; -} - - - -/* @func GPS_Input_Get_Route ******************************************* -** -** Construct a route array from a file -** -** @param [w] way [GPS_PWay **] pointer to waypoint array -** @param [r] inf [FILE *] stream -** -** @return [int32] number of entries -************************************************************************/ - -int32 GPS_Input_Get_Route(GPS_PWay** way, FILE* inf) -{ - char s[GPS_ARB_LEN]; - int32 n; - int32 type; - int32 rtype=0; - int32 atype=0; - int32 i; - long pos; - int32 ret; - char* p; - int32 d; - - gps_errno = INPUT_ERROR; - - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - if (sscanf(s,"Route log %d",(int*)&atype)!=1) { - return gps_errno; - } - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - - switch (atype) { - case pA200: - break; - case pA201: - return GPS_Input_Get_Route201(way,inf); - default: - GPS_Error("GPS_Input_Get_Route: Unknown protocol"); - return PROTOCOL_ERROR; - } - - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - if (sscanf(s,"Route Type: %d",(int*)&rtype)!=1) { - return gps_errno; - } - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - if (sscanf(s,"Waypoints Type: %d",(int*)&type)!=1) { - return gps_errno; - } - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - if (strncmp(s,"Start",5)) { - return gps_errno; - } - - pos = ftell(inf); - n = 1; - while (strncmp(s,"End",3)) { - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - if (strstr(s,"Latitude") || strstr(s,"Route")) { - ++n; - } - } - fseek(inf,0L,0); - - - if (!(*way=(GPS_PWay*)malloc(n*sizeof(GPS_PWay*)))) { - return MEMORY_ERROR; - } - for (i=0; iprot = type; - } - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - - for (i=0; irte_prot = rtype; - (*way)[i]->islink = 0; - if (strstr(s,"Route")) { - (*way)[i]->isrte = 1; - switch (rtype) { - case 200: - p = strchr(s,':'); - p = strchr(p+1,':'); - if (sscanf(p+1,"%d",(int*)&d)!=1) { - return gps_error; - } - (*way)[i]->rte_num=d; - break; - case 201: - p = strchr(s,':'); - p = strchr(p+1,':'); - if (sscanf(p+1,"%d",(int*)&d)!=1) { - return gps_error; - } - (*way)[i]->rte_num=d; - ++p; - GPS_Input_Load_String((*way)[i]->rte_cmnt,20,p+2); - break; - case 202: - p = strchr(s,':'); - p = strchr(p+1,':'); - GPS_Input_Load_Strnull((*way)[i]->rte_ident,p+1); - break; - } - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - continue; - } else { - (*way)[i]->isrte=0; - } - - if (strstr(s,"End")) { - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - - continue; - } - - - switch (type) { - case 100: - ret = GPS_Input_Get_D100(&((*way)[i]),inf); - if (ret<0) { - return gps_errno; - } - break; - case 101: - ret = GPS_Input_Get_D101(&((*way)[i]),inf); - if (ret<0) { - return gps_errno; - } - break; - case 102: - ret = GPS_Input_Get_D102(&((*way)[i]),inf); - if (ret<0) { - return gps_errno; - } - break; - case 103: - ret = GPS_Input_Get_D103(&((*way)[i]),inf); - if (ret<0) { - return gps_errno; - } - break; - case 104: - ret = GPS_Input_Get_D104(&((*way)[i]),inf); - if (ret<0) { - return gps_errno; - } - break; - case 105: - ret = GPS_Input_Get_D105(&((*way)[i]),inf); - if (ret<0) { - return gps_errno; - } - break; - case 106: - ret = GPS_Input_Get_D106(&((*way)[i]),inf); - if (ret<0) { - return gps_errno; - } - break; - case 107: - ret = GPS_Input_Get_D107(&((*way)[i]),inf); - if (ret<0) { - return gps_errno; - } - break; - case 108: - ret = GPS_Input_Get_D108(&((*way)[i]),inf); - if (ret<0) { - return gps_errno; - } - break; - case 150: - ret = GPS_Input_Get_D150(&((*way)[i]),inf); - if (ret<0) { - return gps_errno; - } - break; - case 151: - ret = GPS_Input_Get_D151(&((*way)[i]),inf); - if (ret<0) { - return gps_errno; - } - break; - case 152: - ret = GPS_Input_Get_D152(&((*way)[i]),inf); - if (ret<0) { - return gps_errno; - } - break; - case 154: - ret = GPS_Input_Get_D154(&((*way)[i]),inf); - if (ret<0) { - return gps_errno; - } - break; - case 155: - ret = GPS_Input_Get_D155(&((*way)[i]),inf); - if (ret<0) { - return gps_errno; - } - break; - default: - GPS_Error("Input_Get_Waypoints: Unknown protocol"); - return PROTOCOL_ERROR; - } - - } - - return n; -} - - - -/* @funcstatic GPS_Input_Get_Route201 *********************************** -** -** Construct a route array from a file -** -** @param [w] way [GPS_PWay **] pointer to waypoint array -** @param [r] inf [FILE *] stream -** -** @return [int32] number of entries -************************************************************************/ - -static int32 GPS_Input_Get_Route201(GPS_PWay** way, FILE* inf) -{ - char s[GPS_ARB_LEN]; - int32 n; - int32 type; - int32 rtype; - int32 i; - long pos; - int32 ret; - char* p; - int32 d; - - gps_errno = INPUT_ERROR; - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - if (sscanf(s,"Route Type: %d",(int*)&rtype)!=1) { - return gps_errno; - } - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - if (sscanf(s,"Waypoints Type: %d",(int*)&type)!=1) { - return gps_errno; - } - - - pos = ftell(inf); - n = 1; - while (strncmp(s,"End",3)) { - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - if (strstr(s,"Latitude") || strstr(s,"Route") || strstr(s,"Link Class")) { - ++n; - } - } - fseek(inf,0L,0); - - if (!(*way=(GPS_PWay*)malloc(n*sizeof(GPS_PWay*)))) { - return MEMORY_ERROR; - } - for (i=0; iprot = type; - } - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - - for (i=0; irte_prot = rtype; - (*way)[i]->islink = 0; - if (strstr(s,"Route")) { - (*way)[i]->isrte = 1; - switch (rtype) { - case 200: - p = strchr(s,':'); - p = strchr(p+1,':'); - if (sscanf(p+1,"%d",(int*)&d)!=1) { - return gps_error; - } - (*way)[i]->rte_num=d; - break; - case 201: - p = strchr(s,':'); - p = strchr(p+1,':'); - if (sscanf(p+1,"%d",(int*)&d)!=1) { - return gps_error; - } - (*way)[i]->rte_num=d; - p = strchr(p+1,':'); - GPS_Input_Load_String((*way)[i]->rte_cmnt,20,p+1); - break; - case 202: - p = strchr(s,':'); - p = strchr(p+1,':'); - GPS_Input_Load_Strnull((*way)[i]->rte_ident,p+1); - break; - } - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - continue; - } else { - (*way)[i]->isrte=0; - } - - - - if (strstr(s,"Link Class")) { - (*way)[i]->islink = 1; - - p = strchr(s,':'); - if (sscanf(p+1,"%d",(int*)&d)!=1) { - return gps_error; - } - (*way)[i]->rte_link_class=d; - - if (!((*way)[i]->rte_link_class==3 || (*way)[i]->rte_link_class - ==0xff)) { - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - GPS_Input_Load_String((*way)[i]->rte_link_subclass,18,s); - } else { - GPS_Util_Put_Short((UC*)(*way)[i]->rte_link_subclass,0); - GPS_Util_Put_Int((UC*)(*way)[i]->rte_link_subclass+2,0); - GPS_Util_Put_Uint((UC*)(*way)[i]->rte_link_subclass+6, - 0xffffffff); - GPS_Util_Put_Uint((UC*)(*way)[i]->rte_link_subclass+10, - 0xffffffff); - GPS_Util_Put_Uint((UC*)(*way)[i]->rte_link_subclass+14, - 0xffffffff); - } - - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - GPS_Input_Load_Strnull((*way)[i]->rte_link_ident,s); - - continue; - } else { - (*way)[i]->islink=0; - } - - - if (strstr(s,"End")) { - GPS_Error("Get_Route201: Unexpected End"); - return INPUT_ERROR; - } - - - switch (type) { - case 100: - ret = GPS_Input_Get_D100(&((*way)[i]),inf); - if (ret<0) { - return gps_errno; - } - break; - case 101: - ret = GPS_Input_Get_D101(&((*way)[i]),inf); - if (ret<0) { - return gps_errno; - } - break; - case 102: - ret = GPS_Input_Get_D102(&((*way)[i]),inf); - if (ret<0) { - return gps_errno; - } - break; - case 103: - ret = GPS_Input_Get_D103(&((*way)[i]),inf); - if (ret<0) { - return gps_errno; - } - break; - case 104: - ret = GPS_Input_Get_D104(&((*way)[i]),inf); - if (ret<0) { - return gps_errno; - } - break; - case 105: - ret = GPS_Input_Get_D105(&((*way)[i]),inf); - if (ret<0) { - return gps_errno; - } - break; - case 106: - ret = GPS_Input_Get_D106(&((*way)[i]),inf); - if (ret<0) { - return gps_errno; - } - break; - case 107: - ret = GPS_Input_Get_D107(&((*way)[i]),inf); - if (ret<0) { - return gps_errno; - } - break; - case 108: - ret = GPS_Input_Get_D108(&((*way)[i]),inf); - if (ret<0) { - return gps_errno; - } - break; - case 150: - ret = GPS_Input_Get_D150(&((*way)[i]),inf); - if (ret<0) { - return gps_errno; - } - break; - case 151: - ret = GPS_Input_Get_D151(&((*way)[i]),inf); - if (ret<0) { - return gps_errno; - } - break; - case 152: - ret = GPS_Input_Get_D152(&((*way)[i]),inf); - if (ret<0) { - return gps_errno; - } - break; - case 154: - ret = GPS_Input_Get_D154(&((*way)[i]),inf); - if (ret<0) { - return gps_errno; - } - break; - case 155: - ret = GPS_Input_Get_D155(&((*way)[i]),inf); - if (ret<0) { - return gps_errno; - } - break; - default: - GPS_Error("Input_Get_Waypoints: Unknown protocol"); - return PROTOCOL_ERROR; - } - if (!GPS_Input_Read_Line(s,inf)) { - return gps_errno; - } - } - - return n; -} diff --git a/jeeps/gpsinput.h b/jeeps/gpsinput.h deleted file mode 100644 index 73341b98d..000000000 --- a/jeeps/gpsinput.h +++ /dev/null @@ -1,14 +0,0 @@ -#ifndef gpsinput_h -#define gpsinput_h - - -#include "gps.h" - - int32 GPS_Input_Get_Almanac(GPS_PAlmanac** alm, FILE* inf); - int32 GPS_Input_Get_Waypoint(GPS_PWay** way, FILE* inf); - int32 GPS_Input_Get_Proximity(GPS_PWay** way, FILE* inf); - int32 GPS_Input_Get_Track(GPS_PTrack** trk, FILE* inf); - int32 GPS_Input_Get_Route(GPS_PWay** way, FILE* inf); - - -#endif diff --git a/msvc/GPSBabel.vcxproj b/msvc/GPSBabel.vcxproj index 20642aa0b..c14952e7f 100644 --- a/msvc/GPSBabel.vcxproj +++ b/msvc/GPSBabel.vcxproj @@ -311,7 +311,6 @@ - -- 2.30.2